package com.company.config;

import com.company.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource(value = {"classpath:/person.properties"})//使用@PropertiesSource读取外部配置文件中的K，V保存到环境变量中
public class MainConfigValue {

    @Bean
    public Person person() {
        return new Person();
    }
}
